<div class="vehicles index">
	<h2><?php __('Vehiculos');?></h2>
	<table cellpadding="0" cellspacing="0">
	<tr>
			<th><?php echo $this->Paginator->sort('id');?></th>
			<th><?php echo $this->Paginator->sort('Modelo','models_id');?></th>
                        <th><?php echo $this->Paginator->sort('Marca','brands');?></th>
			<th><?php echo $this->Paginator->sort('Tipo de vehiculo','vehicles_types_id');?></th>
			<th><?php echo $this->Paginator->sort('extranjero');?></th>
			<th><?php echo $this->Paginator->sort('Dominio Completo','dom_parcial');?></th>
			<th><?php echo $this->Paginator->sort('Motor Completo','motor_parc');?></th>
                        <th><?php echo $this->Paginator->sort('Chasis Completo','chasis_parc');?></th>
			<th><?php echo $this->Paginator->sort('rodamiento');?></th>
			<th><?php echo $this->Paginator->sort('observaciones');?></th>
			<th><?php echo $this->Paginator->sort('dominio');?></th>
			<th><?php echo $this->Paginator->sort('Numero Motor','nro_motor');?></th>
			<th><?php echo $this->Paginator->sort('Numero Chasis','nro_chasis');?></th>
			<th class="actions"><?php __('Acciones');?></th>
	</tr>
	<?php
	$i = 0;
	foreach ($vehicles as $vehicle):
		$class = null;
		if ($i++ % 2 == 0) {
			$class = ' class="altrow"';
		}
	?>
	<tr<?php echo $class;?>>
		<td><?php echo $vehicle['Vehicle']['id']; ?>&nbsp;</td>
		<td>
			<?php echo $models[$vehicle['Models']['id']]; ?>
		</td>
                <td>
			<?php echo $brands[$vehicle['Models']['brands_id']]; ?>
		</td>
		<td>
			<?php echo $this->Html->link($vehiclesTypes[$vehicle['VehiclesTypes']['id']], array('controller' => 'vehicles_types', 'action' => 'view', $vehicle['VehiclesTypes']['id'])); ?>
		</td>
                <?php //echo ( $vehicle['Vehicle']['extranjero'] == '0' ) ? 'No' : 'Si';?>
		<td><?php echo($vehicle['Vehicle']['extranjero'] == '0' ) ? 'No' : 'Si'; ?>&nbsp;</td>
		<td><?php echo($vehicle['Vehicle']['dom_parcial'] == '0' ) ? 'No' : 'Si'; ?>&nbsp;</td>
		<td><?php echo($vehicle['Vehicle']['motor_parc'] == '0' ) ? 'No' : 'Si'; ?>&nbsp;</td>
                <td><?php echo($vehicle['Vehicle']['chasis_parc'] == '0' ) ? 'No' : 'Si'; ?>&nbsp;</td>
		<td><?php echo($vehicle['Vehicle']['rodamiento'] == '0' ) ? 'No Apto' : 'Apto'; ?>&nbsp;</td>
		<td><?php echo $vehicle['Vehicle']['observaciones']; ?>&nbsp;</td>
		<td><?php echo $vehicle['Vehicle']['dominio']; ?>&nbsp;</td>
		<td><?php echo $vehicle['Vehicle']['nro_motor']; ?>&nbsp;</td>
		<td><?php echo $vehicle['Vehicle']['nro_chasis']; ?>&nbsp;</td>
		<td class="actions">
			<?php echo $html->image('search.png', array( 'width' => '13', 'heigth' => '13', 'alt' =>'Ver', 'title' => 'Ver', 'url' => array('action' => 'view', $vehicle['Vehicle']['id'])));?>
			<?php echo $html->image('edit.png', array( 'width' => '13', 'heigth' => '13', 'alt' =>'Editar', 'title' => 'Editar', 'url' => array('action' => 'edit', $vehicle['Vehicle']['id']) ));?>
			<?php //echo $this->Html->link(__('Borrar', true), array('action' => 'delete', $vehicle['Vehicle']['id']), null, sprintf(__('Are you sure you want to delete # %s?', true), $vehicle['Vehicle']['id'])); ?>
			
		</td>
	</tr>
<?php endforeach; ?>
	</table>
	<p>
	<?php
	echo $this->Paginator->counter(array(
	'format' => __('Pagina %page% de %pages%, mostrando %current% registros de un total de %count%, comienza en %start%, termina en %end%', true)
	));
	?>	</p>

	<div class="paging">
		<?php echo $this->Paginator->prev('<< ' . __('previous', true), array(), null, array('class'=>'disabled'));?>
	 | 	<?php echo $this->Paginator->numbers();?>
 |
		<?php echo $this->Paginator->next(__('next', true) . ' >>', array(), null, array('class' => 'disabled'));?>
	</div>
</div>